﻿using Hotel.WCF.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Hotel.Models;

namespace Hotel.WCF.ImpServices
{
    public partial class GestionHotel : IHotel
    {
        private Ref_Type_Chambres _refTypChambre;
        public int AddRefTypeChambres(Ref_Type_Chambres rtc)
        {
            int res = -1;
            try
            {
                _refTypChambre = new Ref_Type_Chambres();
                _refTypChambre = rtc;
                _refTypChambre.Ajouter();
                res = 1;

            }
            catch (Exception ex)
            {
                res = -1;
                //logger les erreurs
                throw ex;
            }

            return res;
        }

        public List<Ref_Type_Chambres> getListRefTypeChambres()
        {
            _refTypChambre = new Ref_Type_Chambres();
            return _refTypChambre.GetListeInstances();
        }
    }
}